package com.coolwen.dao;

import com.coolwen.entity.Group;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GroupMapper {
    int deleteByPrimaryKey(Integer groupId);

    int insert(Group record);

    int insertSelective(Group record);

    Group selectByPrimaryKey(Integer groupId);

    int updateByPrimaryKeySelective(Group record);

    int updateByPrimaryKey(Group record);

    List<Group> selectByInitiatorId(Integer initiatorId);

    List<Group> selectGroupByTypeId(Integer typeId);

    List<Group> selectGroupByUserId(Integer userId);

    List<Group> selectGroupByStateAndGroupInitiatorId(@Param("groupState") Integer groupState,@Param("groupInitiatorId") Integer groupInitiatorId);

    List<Group> selectGroupByStateAndUserId(@Param("groupState") Integer groupState,@Param("userId") Integer userId);

    List<Group> selectAllGroup();
}